﻿<Window x:Class="Orchardization.UI.SelectModelWindow"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
             mc:Ignorable="d" Height="716" Width="668" Title="Create a part">
    <Window.Resources>
        <BooleanToVisibilityConverter x:Key="b2v" />
    </Window.Resources>
    <Grid RenderTransformOrigin="0.5,0.5">
        <Grid.RenderTransform>
            <TransformGroup>
                <ScaleTransform/>
                <SkewTransform/>
                <RotateTransform Angle="-0.042"/>
                <TranslateTransform/>
            </TransformGroup>
        </Grid.RenderTransform>
        <Label Content="Choose a part name:" HorizontalAlignment="Left"   Margin="36,39,0,0" VerticalAlignment="Top"/>
        <TextBox HorizontalAlignment="Left"
              Margin="169,43,0,0"
              VerticalAlignment="Top"
              Text="{Binding PartName}"
              Width="311"/>
        <Label Content="Properties" HorizontalAlignment="Left" Height="27" Margin="36,84,0,0" VerticalAlignment="Top" Width="119"/>
        <TextBox HorizontalAlignment="Left" Height="124.19" Margin="169,83.967,0,0" VerticalAlignment="Top" Width="311" Text="{Binding Properties}" AcceptsReturn="True" VerticalScrollBarVisibility="Visible"  />


        <Label Content="Show in Admin &#xD;&#xA;Summary" HorizontalAlignment="Left" Margin="36,222.896,0,0" VerticalAlignment="Top" Width="119.127"/>
        <CheckBox Content="" HorizontalAlignment="Left" Height="14.099" Margin="169,238.757,0,0" VerticalAlignment="Top" Width="40.981" IsChecked="{Binding ShowAdminSummary}"/>

        <Label Content="Storage" HorizontalAlignment="Left" Margin="35.873,266.747,0,0" VerticalAlignment="Top" Width="119.127"/>
        <ComboBox HorizontalAlignment="Left" Height="21" Margin="169,272,0,0" VerticalAlignment="Top" Width="311" SelectedItem="{Binding Storage, Mode=OneWayToSource}">
            <ComboBoxItem Content="Infoset Storage" HorizontalAlignment="Left" Width="177.726"/>
            <ComboBoxItem Content="Record Storage" HorizontalAlignment="Left" Width="177.726"/>
            <ComboBoxItem Content="Infoset and Record Storage" HorizontalAlignment="Left" Width="177.726"/>
        </ComboBox>

        <Label Content="Site Setting" HorizontalAlignment="Left" Margin="36,310.707,0,0" VerticalAlignment="Top" Width="119.127"/>
        <CheckBox Name="SiteSetting" Content="" HorizontalAlignment="Left" Height="14" Margin="169,319,0,0" VerticalAlignment="Top" Width="17" IsChecked="{Binding SiteSetting}"/>

        <Label Content="Settings Group" HorizontalAlignment="Left"   Margin="35.873,340.667,0,0" VerticalAlignment="Top"
			Visibility="{Binding Path=IsChecked,ElementName=SiteSetting,Converter={StaticResource b2v}}"/>
        <TextBox HorizontalAlignment="Left"
              Margin="169,345.667,0,0"
              VerticalAlignment="Top"
              Text="{Binding SiteSection}"
              Width="311"
			  Visibility="{Binding Path=IsChecked,ElementName=SiteSetting,Converter={StaticResource b2v}}"/>

        <Label Content="Create Migrations" HorizontalAlignment="Left" Margin="36,377.672,0,0" VerticalAlignment="Top" Width="119.127" RenderTransformOrigin="0.176,-1.816"/>
        <CheckBox Name="CreateMigrations" Content="" HorizontalAlignment="Left" Height="14" Margin="169,385.006,0,0" VerticalAlignment="Top" Width="17" IsChecked="{Binding CreateMigrations}" />

        <Grid Visibility="{Binding Path=IsChecked,ElementName=CreateMigrations,Converter={StaticResource b2v}}" Margin="0,69,0,-69">
            <Label Content="Make Attachable" HorizontalAlignment="Left" Margin="233.718,311.147,0,0" VerticalAlignment="Top" Width="119"/>
            <CheckBox Name="MakeAttachable" Content="" HorizontalAlignment="Left" Height="14.099" Margin="373.015,319.008,0,0" VerticalAlignment="Top" Width="16.981" IsChecked="{Binding Attachable}" />

            <Label Content="Part Help Text" HorizontalAlignment="Left" Margin="36,344,0,0" VerticalAlignment="Top" Width="119" 
				Visibility="{Binding Path=IsChecked,ElementName=MakeAttachable,Converter={StaticResource b2v}}"/>
            <TextBox HorizontalAlignment="Left"
            	Margin="169,342.107,0,0"
            	VerticalAlignment="Top"
            	Text="{Binding HelpText}"
            	Width="311"
            	Height="33" 
				Visibility="{Binding Path=IsChecked,ElementName=MakeAttachable,Converter={StaticResource b2v}}"/>

            <Label Content="Select Migration" HorizontalAlignment="Left" Margin="36,383,0,0" VerticalAlignment="Top" Width="119"/>
            <ComboBox HorizontalAlignment="Left"
				  Margin="169,387,0,0"
				  VerticalAlignment="Top"
				  ItemsSource="{Binding Migrations}"
                  DisplayMemberPath="DisplayName"
				  SelectedItem="{Binding SelectedMigration, Mode=OneWayToSource}"
				  Width="311" Height="21"/>
            <Label Content="Or define a new migration class" HorizontalAlignment="Left" Margin="36,409,0,0" VerticalAlignment="Top" Width="219"/>
            <TextBox HorizontalAlignment="Left"
            	Margin="269,415,0,0"
            	VerticalAlignment="Top"
            	Text="{Binding Migration}"
            	Width="211"
            	 />
            

            <Label Content="Create Widget" HorizontalAlignment="Left" Margin="36,437,0,0" VerticalAlignment="Top" Width="119"/>
            <CheckBox Name="CreateWidget" Content="" HorizontalAlignment="Left" Height="14" Margin="169,444,0,0" VerticalAlignment="Top" Width="132" IsChecked="{Binding CreateWidget}" />
            <TextBox HorizontalAlignment="Left"
				Margin="234,442,0,0"
				VerticalAlignment="Top"
				Text="{Binding WidgetName}"
				Width="246"
				Visibility="{Binding Path=IsChecked,ElementName=CreateWidget,Converter={StaticResource b2v}}" />
            






        </Grid>

        <Button Content="Add" IsDefault="True" HorizontalAlignment="Left" Margin="169,545.997,0,0" VerticalAlignment="Top" Width="75" RenderTransformOrigin="-0.187,0.75" Click="Button_Click"/>
        <Button Content="Cancel" IsCancel="True" HorizontalAlignment="Left" VerticalAlignment="Top" Width="75" Margin="268.703,545.997,0,0"/>

        <TextBlock HorizontalAlignment="Left" Height="124.157" Margin="504.187,84,0,0" TextWrapping="Wrap" VerticalAlignment="Top" Width="116.914" FontStyle="Italic"><Run Text="Format" TextDecorations="Underline"/><LineBreak/><Run Text="Name:string"/><LineBreak/><Run Text="Age:int"/><LineBreak/><Run Text="Awesome:bool"/></TextBlock>
        <TextBlock HorizontalAlignment="Left" Margin="215,236,0,0" TextWrapping="Wrap" Text="Show in the admin Content list view" VerticalAlignment="Top" Height="21" Width="256" FontStyle="Italic"/>
        <TextBlock HorizontalAlignment="Left" Margin="215,316,0,0" TextWrapping="Wrap" Text="Make this a site setting" VerticalAlignment="Top" Height="21" Width="256" FontStyle="Italic"/>
    </Grid>
</Window>
